﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProcessJob.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <!--#include virtual="include/Head.ascx"-->

    <script type="text/javascript" language="javascript">				
		    function doDelete(strID, strType,bdel)
		    {
			    if(bdel=="no")
			    {
			    alert("Bạn phải xóa các quy trình con trước!");
			    }
			    else
			    {
			    if (confirm('Bạn có thực sự muốn xóa'))
			    {
	                var vnpage= getUrlVars()['page_number'];
	                if(vnpage)
	                    window.location.href = "ProcessJob.aspx?type="+strType+"&action=delete&PortsID=" + strID + "&page_number=" + vnpage;
	                else
		                window.location.href = "ProcessJob.aspx?type="+strType+"&action=delete&PortsID=" + strID;
		        }
		        }
		    }
		   
            function getUrlVars()
            {
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                for(var i = 0; i < hashes.length; i++)
                {
                    hash = hashes[i].split('=');
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
                return vars;
            }
    </script>

</head>
<body>
    <div id="body-wrapper">
        <div id="header">
            <!--#include virtual="include/top.ascx"-->
        </div>
        <div id="main-content1">
            <h2>
                QUY TRÌNH
                <%Response.Write(strProcessName); %>
            </h2>
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmCarrContact" runat="server" autocomplete="off">
                    <%if (nPermissions >= 3) {%>
                    <div class="content-box-header">
                        <h3 style="cursor: s-resize;">
                            Quy trình
                            <%Response.Write(strProcessName); %>
                            Add [Edit]
                        </h3>
                        <div class="clear">
                        </div>
                    </div>
                    <table class="adminedit">
                        <tr>
                            <td>
                                Sort</td>
                            <td>
                                Loading Port</td>
                            <td>
                                Các bước công việc</td>
                        </tr>
                        <tr>
                            <td align="left" width="30px">
                                <asp:TextBox class="cls" ID="txtSort" runat="server" Width="82%" TabIndex="2" Text="0"></asp:TextBox>
                            </td>
                            <td width="80px">
                                <asp:TextBox class="cls" ID="txtLoadingPort" runat="server" Width="82%" TabIndex="2"
                                    Text=""></asp:TextBox></td>
                            <td width="250px">
                                <asp:TextBox class="cls" ID="txtStepsJob" runat="server" Width="82%" TabIndex="2"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:Label id="lblerror" CssClass="error" runat="server"></asp:Label>                                
                            </td>
                        </tr>
                    </table>
                    <table class="paramlist admintable" width="100%">
                        <tr>
                            <td>
                                <asp:Button class="button" ID="btnSave" runat="server" TabIndex="2" Text="Save" OnClick="btnSave_Click" />
                                &nbsp;&nbsp;&nbsp;<asp:Button class="button" ID="btnAdd" runat="server" TabIndex="2"
                                    Text="Add" OnClick="btnAdd_Click" />
                            </td>
                        </tr>
                    </table>
                    <%} %>
                    <div class="content-box-header">
                        <h3 style="cursor: s-resize;">
                            Quy trình
                            <%Response.Write(strProcessName); %>
                        </h3>
                         <asp:DropDownList class="cls" ID="drLoadingPort" runat="server" Width="150px" TabIndex="16"
                                AutoPostBack="True" OnSelectedIndexChanged="drLoadingPort_Selected"></asp:DropDownList>
                        <div class="clear">
                        </div>                       
                    </div>                     
                    <div class="ProcessJob">
                        <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                            <thead>
                                <tr style="background: #CCC;">
                                    <th align="center">
                                        Các quy trình
                                    </th>
                                    <th align="center">
                                        Cập nhật</th>
                                    <%if (nPermissions >= 3) {%>
                                    <th align="center">
                                        Action</th>
                                    <%} %>
                                </tr>
                            </thead>
                            <%LoadStepJob(0,0);%>
                        </table>
                    </div>
                    <div class="clear">
                    </div>
                    <div id="footer">
                        <%=strPager%>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <%--<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>

    <script type="text/javascript">
_uacct = "UA-2623402-1";
urchinTracker();
    </script>--%>

</body>
</html>
